package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.EQuestionMapper;
import com.ruoyi.system.domain.EQuestion;
import com.ruoyi.system.service.IEQuestionService;
import com.ruoyi.common.core.text.Convert;

/**
 * 设备问题报备Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-07-02
 */
@Service
public class EQuestionServiceImpl implements IEQuestionService 
{
    @Autowired
    private EQuestionMapper eQuestionMapper;

    /**
     * 查询设备问题报备
     * 
     * @param id 设备问题报备ID
     * @return 设备问题报备
     */
    @Override
    public EQuestion selectEQuestionById(Long id)
    {
        return eQuestionMapper.selectEQuestionById(id);
    }

    /**
     * 查询设备问题报备列表
     * 
     * @param eQuestion 设备问题报备
     * @return 设备问题报备
     */
    @Override
    public List<EQuestion> selectEQuestionList(EQuestion eQuestion)
    {
        return eQuestionMapper.selectEQuestionList(eQuestion);
    }

    /**
     * 新增设备问题报备
     * 
     * @param eQuestion 设备问题报备
     * @return 结果
     */
    @Override
    public int insertEQuestion(EQuestion eQuestion)
    {
        eQuestion.setCreateTime(DateUtils.getNowDate());
        return eQuestionMapper.insertEQuestion(eQuestion);
    }

    /**
     * 修改设备问题报备
     * 
     * @param eQuestion 设备问题报备
     * @return 结果
     */
    @Override
    public int updateEQuestion(EQuestion eQuestion)
    {
        eQuestion.setUpdateTime(DateUtils.getNowDate());
        return eQuestionMapper.updateEQuestion(eQuestion);
    }

    /**
     * 删除设备问题报备对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteEQuestionByIds(String ids)
    {
        return eQuestionMapper.deleteEQuestionByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除设备问题报备信息
     * 
     * @param id 设备问题报备ID
     * @return 结果
     */
    @Override
    public int deleteEQuestionById(Long id)
    {
        return eQuestionMapper.deleteEQuestionById(id);
    }
}
